Ext.define('carManage.view.tollsInfo.EditOrAddForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.editOrAddForm',
    width: '100%',
    height: '100%',
    bodyStyle: 'padding: 4px',
    border: false,
    autoscroll: true,
    frame: false,
    autoScroll: true,
    fieldDefaults: {
        labelWidth: 110
    },
    items: [{
            xtype: 'container',
            anchor: '100%',
            layout: 'hbox',
            items: [{
                    xtype: 'container',
                    flex: 1,
                    layout: 'anchor',
                    items: [{
                            name: 'id',
                            xtype: 'hidden'
                        },
                        {
                            xtype: 'combo',
                            fieldLabel: '车牌号码',
                            queryParam: 'name',
                            autoSelect: false,
                            name: 'car_code',
                            displayField: 'name',
                            valueField: 'name',
                            emptyText: '车牌号码',
                            anchor: '95%',
                            typeAhead: true,
                            triggerAction: 'all',
                            store: 'CarList_store'
                        }, {
                            xtype: 'datefield',
                            fieldLabel: '费用日期',
                            emptyText: '费用日期（必填）',
                            allowBlank: false,
                            altFormats: 'Ymd|Y-m-d',
                            format: 'Y-m-d',
                            dateFormat: 'Y-m-d',
                            name: 'fee_date',
                            anchor: '95%'
                        }
                    ]
                }, {
                    xtype: 'container',
                    flex: 1,
                    layout: 'anchor',
                    items: [
                        {
                            xtype: 'combo',
                            labelWidth: 70,
                            fieldLabel: '费用类型',
                            emptyText: '费用类型',
                            displayField: 'name',
                            valueField: 'value',
                            store: 'FeeTypeComboStore',
                            mode: 'query',
                            triggerAction: 'all',
                            name: 'tolls_type',
                            queryParam: 'name',
                            minChars: 2,
                            anchor: '95%'
                        }, {
                            xtype: 'numberfield',
                            fieldLabel: '金额',
                            labelWidth: 70,
                            allowBlank:false,
                            emptyText: '金额',
                            name: 'cost',
                            anchor: '95%'
                        }
                    ]
                }]
        }, {
            xtype: 'htmleditor',
            name: 'remark',
            fieldLabel: '备注',
            anchor: '98%'
        }],
    initComponent: function() {
        this.callParent(arguments);
    }
});